<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:79:"D:\important\netwws-cms\public/../application/admin\view\setting\createnav.html";i:1507614517;s:76:"D:\important\netwws-cms\public/../application/admin\view\extends\extend.html";i:1507614517;}*/ ?>
<!DOCTYPE html>
<html>
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <!--bootstarp-->
    <link href="__admin__/css/bootstrap.min.css" rel="stylesheet">
    <!-- 图标-->
    <link href="__admin__/css/font-awesome.min.css" rel="stylesheet">
    <!-- animate -->
    <link href="__admin__/css/animate.min.css" rel="stylesheet">
    <!--自定义css-->
    <link href="__admin__/css/style.min.css" rel="stylesheet">
    
    <!--美化 checkbox radio css-->
    <link href="__admin__/css/plugins/iCheck/custom.css" rel="stylesheet">

</head>
<body class="gray-bg">

    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>新增权限节点</h5>
                        <div class="ibox-tools">
                            <a href="javascript:history.go(-1);" class="btn btn-outline btn-info btn-xs">
                                <i class="fa fa-arrow-circle-left"></i> 返回
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <form method="post" action="" class="form-horizontal" id="checkForm">
                            <div class="form-group">
                                <label class="col-sm-2 control-label">上级菜单</label>
                                <div class="col-sm-10">
                                    <select class="form-control m-b" name="pid">
                                        <option value="0">---顶级菜单---</option>
                                        <?php if(is_array($navList) || $navList instanceof \think\Collection || $navList instanceof \think\Paginator): $i = 0; $__LIST__ = $navList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?>
                                            <option value="<?php echo $v['admin_nav_id']; ?>" <?php if($v['admin_nav_id'] == $admin_nav_id): ?>selected<?php endif; ?> ><?php echo $v['preffix']; ?><?php echo $v['title']; ?></option>
                                        <?php endforeach; endif; else: echo "" ;endif; ?>
                                    </select>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">菜单名</label>
                                <div class="col-sm-10">
                                    <input type="text" name="title"  required class="form-control">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">链接</label>
                                <div class="col-sm-10">
                                    <input type="text" name="name" required class="form-control">
                                    <span class="help-block m-b-none">输入模块/控制器/方法即可 例如 Admin/Rule/index添加 为空或者 父级菜单 #</span>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">图标</label>
                                <div class="col-sm-10">
                                    <input type="text" name="ico"  class="form-control">
                                    <span class="help-block m-b-none">Font Awesome 图标</span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">排序</label>
                                <div class="col-sm-10">
                                    <input type="text" name="sort" value="0" required class="form-control">
                                    <span class="help-block m-b-none">倒排序,意味着数字越大排序也高！</span>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                             <div class="form-group">
                                <label class="col-sm-2 control-label">状态
                                </label>
                                <div class="col-sm-10">
                                    <div class="radio i-checks">
                                        <label>
                                            <input type="radio" value="1" checked name="status"> <i></i> 正常</label>
                                    </div>
                                    <div class="radio i-checks">
                                        <label>
                                            <input type="radio" value="0"  name="status"> <i></i> 禁用</label>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-4 col-sm-offset-2">
                                    <?php echo token(); ?>
                                    <button class="btn btn-primary" type="submit">保存</button>
                                    <button class="btn btn-primary" type="reset">重置</button>
                                    <button class="btn btn-primary" type="button" onclick="history.go(-1)">返回</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>

<!-- jquery-->
<script src="__admin__/js/jquery.min.js"></script>
<!-- bootstarp-->
<script src="__admin__/js/bootstrap.min.js"></script>

    <!--美化 checkbox radio js-->
    <script src="__admin__/js/plugins/iCheck/icheck.min.js"></script>
    <!--表单验证 插件-->
    <script src="__admin__/js/plugins/validate/jquery.validate.min.js"></script>
    <script src="__admin__/js/plugins/validate/messages_zh.min.js"></script>
    <script>
        $(document).ready(function () {
            $(".i-checks").iCheck({
                checkboxClass:"icheckbox_square-green",
                radioClass:"iradio_square-green",
            });
            $('#checkForm').validate({
                submitHandler:function(form) {
                    form.submit();
                },
                highlight: function(e) {
                    $(e).closest(".form-group").removeClass("has-success").addClass("has-error")
                },
                success: function(e) {
                    e.closest(".form-group").removeClass("has-error")
                },
                errorClass: "help-block m-b-none",
                rules:{
                    status:{required:true}
                }
            });
        });
    </script>

</body>
</html>
